Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Block: Add missing typography supports to code block #43255

Merged
merged 1 commit into from
Aug 16, 2022

Conversation

aaronrobertshaw
Copy link
Contributor

Related:

What?

Adopts the remaining typography supports for the Code block.

Why?

  • Improves consistency of our design tools across blocks.

How?

  • Opts into font family and text decoration supports

Testing Instructions

  1. Load the editor, add a code block and select it.
  2. Test various typography settings, especially font family and text decoration.
  3. Save and confirm application on the frontend.
  4. Switch to the site editor and navigate to Global Styles > Blocks > Code > Typography and apply typography styles there.
  5. Confirm the selected styles are reflected in the preview and on the frontend.

Screenshots or screencast

Screen.Recording.2022-08-16.at.7.04.27.pm.mp4

@aaronrobertshaw aaronrobertshaw added [Type] Enhancement A suggestion for improvement. [Block] Code Affects the Code Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] Typography Font and typography-related issues and PRs labels Aug 16, 2022
@aaronrobertshaw aaronrobertshaw self-assigned this Aug 16, 2022
Copy link
Member

@ramonjd ramonjd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All typography values are being correctly applied for me in the editors and the frontend. Made sure to add some fontFamilies as well. LGTM

Just checking if this comment from @apeatling still stands:

should we be opting all core blocks above into all typography tools where it makes sense (counter example being font family for the code block)

Screen Shot 2022-08-16 at 8 23 43 pm

I can imagine some themes might add their own monospace font selections, so in my mind it's okay. Plus the control is not shown by default.

?

@aaronrobertshaw
Copy link
Contributor Author

Thanks for reviewing this one @ramonjd 👍

Just checking if this #35604 (comment) from @apeatling still stands:

The latest direction I have is to lean toward adopting all block supports across all blocks. That is of course unless there is no value at all. I think your potential use case highlights a possible use for font family support here.

@apeatling
Copy link
Contributor

This seems fine to me.

@apeatling apeatling self-requested a review August 16, 2022 17:31
@aaronrobertshaw aaronrobertshaw merged commit 34d5e3c into trunk Aug 16, 2022
@aaronrobertshaw aaronrobertshaw deleted the add/missing-typography-support-code-block branch August 16, 2022 22:57
@github-actions github-actions bot added this to the Gutenberg 14.0 milestone Aug 16, 2022
@femkreations femkreations added the Needs User Documentation Needs new user documentation label Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Code Affects the Code Block [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] Typography Font and typography-related issues and PRs Needs User Documentation Needs new user documentation [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants